package br.com.sisat.service;

import java.util.List;

import br.com.sisat.modelo.EspecialidadeDTO;
import br.com.sisat.modelo.PlanoDeSaudeDTO;
import br.com.sisat.modelo.RelatorioPlanoSaudeDTO;
import br.com.sisat.modelo.TerapeutaDTO;
import br.com.sisat.persistencia.DAO.MarcarConsultaDAO;
import br.com.sisat.persistencia.DAO.RelatorioPlanoSaudeDAO;
import br.com.sisat.util.ObjectUtil;

public class RelatorioPlanoSaudeService {

	private static RelatorioPlanoSaudeService service;
	
	public static RelatorioPlanoSaudeService getInstance(){
		if(ObjectUtil.isEmpty(service)){
			service = new RelatorioPlanoSaudeService();
		}
		return service;
	}
	
	public List<EspecialidadeDTO> recuperarEspecialidades() {
		try {
			return RelatorioPlanoSaudeDAO.getInstance().recuperarEspecialidades();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;
	}

	public List<TerapeutaDTO> recuperarTerapeutas() {
		try {
			return RelatorioPlanoSaudeDAO.getInstance().recuperarTerapeutas();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;
	}

	public static List<RelatorioPlanoSaudeDTO> relatorioPlanos(RelatorioPlanoSaudeDTO relPlanSaude) {
		try {
			return RelatorioPlanoSaudeDAO.getInstance().relatorioPlanos(relPlanSaude);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;
	}

	public static List<RelatorioPlanoSaudeDTO> relatorioEspecialidade(RelatorioPlanoSaudeDTO relPlanSaude) {
		try {
			return RelatorioPlanoSaudeDAO.getInstance().relatorioEspecialidades(relPlanSaude);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;
	}

	public List<RelatorioPlanoSaudeDTO> relatorioTerapeuta(RelatorioPlanoSaudeDTO relPlanSaude) {
		try {
			return RelatorioPlanoSaudeDAO.getInstance().relatorioTerapeutas(relPlanSaude);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;
	}

	public List<PlanoDeSaudeDTO> consultarPlanosDeSaude() {
		try {
			return MarcarConsultaDAO.getInstance().consultarPlanosDeSaude();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;
	}
}
